home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / bind.man < prev    next >
Encoding:
Text File  |  1989-01-29  |  3.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. BIND                  C Library Procedures                   BIND
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      bind - bind a name to a socket
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  13.      ##iinncclluuddee <<ssyyss//ssoocckkeett..hh>>
  14.  
  15.      bbiinndd((ss,, nnaammee,, nnaammeelleenn))
  16.      iinntt ss;;
  17.      ssttrruucctt ssoocckkaaddddrr **nnaammee;;
  18.      iinntt nnaammeelleenn;;
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      _B_i_n_d assigns a name to an unnamed socket.  When a socket is
  22.      created with _s_o_c_k_e_t(2) it exists in a name space (address
  23.      family) but has no name assigned.  _B_i_n_d requests that _n_a_m_e
  24.      be assigned to the socket.
  25.  
  26. NNOOTTEESS
  27.      Binding a name in the UNIX domain creates a socket in the
  28.      file system that must be deleted by the caller when it is no
  29.      longer needed (using _u_n_l_i_n_k(2)).
  30.  
  31.      The rules used in name binding vary between communication
  32.      domains.  Consult the manual entries in section 4 for
  33.      detailed information.
  34.  
  35. RREETTUURRNN VVAALLUUEE
  36.      If the bind is successful, a 0 value is returned.  A return
  37.      value of -1 indicates an error, which is further specified
  38.      in the global _e_r_r_n_o.
  39.  
  40. EERRRROORRSS
  41.      The _b_i_n_d call will fail if:
  42.  
  43.      [EBADF]             _S is not a valid descriptor.
  44.  
  45.      [ENOTSOCK]          _S is not a socket.
  46.  
  47.      [EADDRNOTAVAIL]     The specified address is not available
  48.                          from the local machine.
  49.  
  50.      [EADDRINUSE]        The specified address is already in use.
  51.  
  52.      [EINVAL]            The socket is already bound to an
  53.                          address.
  54.  
  55.      [EACCES]            The requested address is protected, and
  56.                          the current user has inadequate permis-
  57.                          sion to access it.
  58.  
  59.      [EFAULT]            The _n_a_m_e parameter is not in a valid
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 22, 1986                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. BIND                  C Library Procedures                   BIND
  71.  
  72.  
  73.  
  74.                          part of the user address space.
  75.  
  76.      The following errors are specific to binding names in the
  77.      UNIX domain.
  78.  
  79.      [ENOTDIR]      A component of the path prefix is not a
  80.                     directory.
  81.  
  82.      [EINVAL]       The pathname contains a character with the
  83.                     high-order bit set.
  84.  
  85.      [ENAMETOOLONG] A component of a pathname exceeded 255 char-
  86.                     acters, or an entire path name exceeded 1023
  87.                     characters.
  88.  
  89.      [ENOENT]       A prefix component of the path name does not
  90.                     exist.
  91.  
  92.      [ELOOP]        Too many symbolic links were encountered in
  93.                     translating the pathname.
  94.  
  95.      [EIO]          An I/O error occurred while making the direc-
  96.                     tory entry or allocating the inode.
  97.  
  98.      [EROFS]        The name would reside on a read-only file
  99.                     system.
  100.  
  101.      [EISDIR]       A null pathname was specified.
  102.  
  103. SSEEEE AALLSSOO
  104.      connect(2), listen(2), socket(2), getsockname(2)
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0               May 22, 1986                          2
  130.  
  131.  
  132.  
  133.